<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<jsp:include page="head.htm" />
</head>
<body>
	<jsp:include page="loggedIn.jsp" />
	<jsp:include page="isAdmin.jsp" />
	<div id="head">
		<h1>Zeiterfassung</h1>
	</div>
	<jsp:include page="menu.jsp" />
	<div id="content">
		<h2>
			<c:out value="${title}" />
		</h2>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1"><c:out value="${message}" /></a></li>
				<li><a href="#tabs-2"><c:out value="${messageAll}" /></a></li>
			</ul>
			<div id="tabs-1">
				<table cellpadding="0" cellspacing="0" class="atag">
					<tr>
						<th></th>
						<th></th>
						<th>Nachname</th>
						<th>Vorname</th>
						<th>Urlaub von</th>
						<th>Urlaub bis</th>
						<th>genehmigen</th>
						<th>ablehnen</th>


					</tr>
					<c:forEach items="${urlaub}" var="urlaub">
						<tr>
							<td><a
								href="EditUrlaub.html?id=<c:out value="${urlaub.id}"/>"> <img
									src="images/edit_s.png" alt="Icon - Bearbeite Urlaubsantrag" />
							</a></td>
							<td><a
								href='DeleteUrlaub.html?id=<c:out value="${urlaub.id}" />&m_id=<c:out value="${urlaub.mitarbeiter.id}" />&admin=<c:out value="true"/>'>
									<img src="images/delete.png" alt="Icon - Lösche Urlaubsantrag" />
							</a></td>

							<td><c:out value="${urlaub.mitarbeiter.mit_name}" /></td>
							<td><c:out value="${urlaub.mitarbeiter.mit_vorname}" /></td>
							<td><fmt:formatDate value="${urlaub.urlaub_von}" type="date" pattern="dd.MM.yyyy" /></td>
							<td><fmt:formatDate value="${urlaub.urlaub_bis}" type="date" pattern="dd.MM.yyyy" /></td>
							<td><center><a
								href='Urlaubgenehmigen.html?id=<c:out value="${urlaub.id}"/>'>
									<img src="images/button_permit_neu.png"
									alt="Icon - Urlaub genehmigen" />
							</a></center></td>
							<td><center><a
								href='Urlaubablehnen.html?id=<c:out value="${urlaub.id}"/>'>
									<img src="images/button_defeat_neu.png"
									alt="Icon - Urlaub ablehnen" />
							</a></center></td>
						</tr>
					</c:forEach>
				</table>
			</div>
			<div id="tabs-2">
				<table cellpadding="0" cellspacing="0" class="atag">
					<colgroup>
						<col class="buttoncell" />
						<col class="buttoncell" />
						<col />
						<col />
					</colgroup>
					<tbody>
						<tr>
							<th></th>

							<th>Nachname</th>
							<th>Vorname</th>
							<th>Urlaub von</th>
							<th>Urlaub bis</th>
							<th>genehmigt</th>



						</tr>
						<c:forEach items="${all}" var="urlaub">
							<tr>
								<td><a
									href="EditUrlaub.html?id=<c:out value="${urlaub.id}"/>"> <img
										src="images/edit_s.png" alt="Icon - Bearbeite Urlaubsantrag" />
								</a></td>


								<td><c:out value="${urlaub.mitarbeiter.mit_name}" /></td>
								<td><c:out value="${urlaub.mitarbeiter.mit_vorname}" /></td>
								<td><fmt:formatDate value="${urlaub.urlaub_von}" type="date" pattern="dd.MM.yyyy" /></td>
								<td><fmt:formatDate value="${urlaub.urlaub_bis}" type="date" pattern="dd.MM.yyyy" /></td>

								<td><c:choose>
										<c:when test="${urlaub.urlaub_genehmigt}">
											<font color="green"><c:out value="ja"></c:out></font>
										</c:when>
										<c:when test="${empty urlaub.urlaub_genehmigt}">
											<font color="orange"><c:out value="nicht bearbeitet"></c:out></font>
										</c:when>
										<c:when test="${!urlaub.urlaub_genehmigt}">
											<font color="red"><c:out value="nein"></c:out></font>
										</c:when>
									</c:choose></td>

							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</body>
</html>
